<?php

require __DIR__ . '/../../vendor/autoload.php';

use Parse\CondParser;
use Parse\StringParser;

{
    $parser = new CondParser(
        array(
            new StringParser("*"),
            new StringParser("/"))
    );

    try {
        var_dump($parser->match("*1") === array("match" => "*",
                                                "rest" => "1"));
        var_dump($parser->match("/10") === array("match" => "/",
                                                 "rest" => "10"));
    } catch (ParseException $e) {
        var_dump(false);
    }
}
